#ifndef WF_PRINTPREVIEW_H
#define WF_PRINTPREVIEW_H

#include "pf_actioninterface.h"
#include "gui_export.h"

/**
 * Default action for print preview.
 *
 */
class GUI_EXPORT WF_PrintPreview : public PF_ActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
		Neutral,
		Moving
    };

public:
    WF_PrintPreview(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_PrintPreview();

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionPrintPreview;
	}

    virtual void init(int status=0);

    virtual void trigger();

    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mousePressEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);

    virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
	virtual PF_StringList getAvailableCommands();

	virtual void showOptions();
	virtual void hideOptions();

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

	void center();
	void fit();
	void setScale(double f);
	double getScale();

	void setBlackWhite(bool bw);
	//bool isBlackWhite() {
	//	return blackWhite;
	//}
	LX_Define::Unit getUnit();

protected:
	//bool blackWhite;
	PF_Vector v1;
	PF_Vector v2;
};

#endif
